package com.example.threadlocal.transmitParams;

/**
 * create by mwh 2021-11-16
 **/

public class ThreadLocalHeadParam {
    public static  ThreadLocal<HeaderParam> threadLocal =  new ThreadLocal();

    public static HeaderParam getThreadLocal() {
        if(threadLocal.get() == null){
            threadLocal.set(new HeaderParam());
        }
        return threadLocal.get();
    }

    public static void setThreadLocal(HeaderParam headerParam) {
        threadLocal.set(headerParam);
    }
}
